package com.dao;

import java.io.Serializable;
import java.sql.SQLException;
import java.util.List;

import com.po.User;

public interface BaseDao<T>{
	public T findById(String id) throws SQLException; 
	
	public T findByType(String type) throws SQLException;
	
	public T findByName(String name) throws SQLException;
      
    public List<T> findAll() throws SQLException;  
    
    public List<T> findAllByPage(int currPage, int pageSize)throws SQLException;
    
    public List<T> findByCondition(String name, String kw,int currPage, int pageSize) throws SQLException;
      
    public boolean save(T entity) throws SQLException;  

    public boolean update(T entity) throws SQLException;        
      
    public boolean delete(T entity) throws SQLException;  
      
    public int getCount() throws SQLException;
              
}
